home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / userhost < prev    next >
Text File  |  2001-03-21  |  2KB  |  41 lines

  1. Synopsis:
  2.    $userhost([<nickname>])
  3.  
  4. Technical:
  5.    Without arguments, this function returns the address of the sending client
  6.    of any message received by the client. It only works in hooks, and only when
  7.    the event hooked originated from another client on the irc network.
  8.    
  9.    When <nickname> is specified, $userhost() will return the user@host of
  10.    the nickname *IF IT IS KNOWN*, else it will give you "<UNKNOWN>@<UNKNOWN>".
  11.    A user@host will only be known to the client if you are on the same channel
  12.    as <nickname>.
  13.  
  14. Practical:
  15.    This function is useful for named hooks that do not dump the sender's
  16.    address into its standard argument list. It also can return the user@host of
  17.    a different person (who didn't trigger the hook), as long as they're in a
  18.    common channel with the client. This saves valuable time, since $userhost()
  19.    does not query the server.
  20.  
  21. Returns:
  22.    address of message sender when used with no arguments, or user@host of
  23.    <nickname> if they are in a common channel with the client.
  24.  
  25. Examples:
  26.    To show someone's address when they leave a channel:
  27.       on ^leave "*" {
  28.          echo *** $0 \($userhost()\) left channel $1
  29.       }
  30.       
  31.    To show another person's address on demand (must be in same channel):
  32.       eval echo Nuke!$userhost(Nuke) writes terrible help files.
  33.  
  34. See Also:
  35.    lastserver(6); who(2); userhost(2).
  36.  
  37. Other Notes:
  38.    When returning a user@host, this function does not query the server.
  39.    Instead, it checks an internal list of users.
  40.  
  41.